/**
 * 
 */
package com.hand.cloud.b2b.jobs;

import de.hybris.platform.cronjob.enums.CronJobResult;
import de.hybris.platform.cronjob.enums.CronJobStatus;
import de.hybris.platform.cronjob.model.CronJobModel;
import de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable;
import de.hybris.platform.servicelayer.cronjob.PerformResult;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;

import com.hand.cloud.b2b.taobao.ItemOperationService;


/**
 * 创建商品信息
 * 
 * @author StephenWang
 * @Time Aug 15, 20149:15:22 AM
 */
public class ItemOperationJob extends AbstractJobPerformable<CronJobModel>
{
	private static final Logger LOG = Logger.getLogger(ItemOperationJob.class);


	private ItemOperationService itemOperationService;

	@Override
	public PerformResult perform(final CronJobModel cronJob)
	{
		LOG.info("-------ProductOperationJob-----------");
		System.out.println("-------ProductOperationJob-----------");

		this.itemOperationService.createItem();

		return new PerformResult(CronJobResult.SUCCESS, CronJobStatus.FINISHED);
	}

	/**
	 * @return the itemOperationService
	 */
	public ItemOperationService getItemOperationService()
	{
		return itemOperationService;
	}

	/**
	 * @param itemOperationService
	 *           the itemOperationService to set
	 */
	@Required
	public void setItemOperationService(final ItemOperationService itemOperationService)
	{
		this.itemOperationService = itemOperationService;
	}

}
